home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 427_01 / hardware / build.txt < prev    next >
Encoding:
Text File  |  1994-04-17  |  11.8 KB  |  281 lines

  1.          How to build a Multi Joystick Interface for youself
  2.          ===================================================
  3.          
  4.          
  5.          Introduction
  6.          ------------
  7.          
  8.          There are two ways of building a Multi Joystick Interface. You
  9.          can etch a printed circuit board and simply solder all com-
  10.          ponents to it, or you can do it the old fashioned way with
  11.          lots of wires. 
  12.               ETCHING.DOC is intended to be of some help if you decide
  13.          to go for a printed circuit. It is also intended to suggest to
  14.          you that etching is worth the extra effort. Soldering is a
  15.          piece of cake with an etched printed circuit board.
  16.          
  17.          
  18.          The board size
  19.          --------------
  20.          
  21.          For etching: a 53mm x 100mm piece of single sided board (one
  22.          third of a 160mm x 100mm standard size board).
  23.          
  24.          If you don't want to etch: a board the size you like with a
  25.          2.5mm drill grid. 100mm length on one edge is fine, as 3
  26.          joystick connectors will fit along this edge and the other
  27.          three along the opposite edge. Depending on the part density
  28.          you think is favourable, the other edge will be about 60mm to
  29.          160mm.
  30.          
  31.          
  32.          The power supply
  33.          ----------------
  34.          
  35.          There are three ways of supplying the interface with electric
  36.          power: 
  37.          
  38.          The method we recommend is to connect the multi joystick in-
  39.          terface to a surplus analogue joystick port on your computer.
  40.          Of course, only the 5V and GND lines will be used. Obviously,
  41.          you need a surplus analogue joystick port to do that.
  42.          
  43.          If you don't have any spare joystick ports, you will have to
  44.          buy a small transformer of 8-20V DC or 6-22V AC, capable of
  45.          supplying 250mA. The AC version of the interface features a
  46.          rectifier and a second voltage stabilizer to cope with the
  47.          (higher) rectified voltage.
  48.  
  49.          If you have to use a transformer, you may want to replace the
  50.          power connector we suggest by a connector of a different type,
  51.          avoiding to have to change the transformer's plug. If you are
  52.          using your analogue joystick port to supply power to the multi
  53.          joystick interface, we recommend that you use a connector
  54.          similar to the walkman-type plug. These connectors do not
  55.          shorten the power supply while you plug them in. (Your computer
  56.          may crash if it's power supply is shortened for fractions of a
  57.          second.)
  58.  
  59.          
  60.          The parts list
  61.          --------------
  62.          
  63.          (0) Basic parts list
  64.          
  65.            2 multiplexor chips 74150
  66.            2 chip sockets (24 pins)
  67.            1 capacitor 0.1µF
  68.            1 electrolytic capacitor 100µF/35V (mounted upright)
  69.          
  70.  
  71.            1 centronics connector (female, 36 pins)
  72.            1 resistor 330 ohms
  73.            1 5mm LED, red (or whatever color you like)
  74.            1 5mm LED socket
  75.            1 20mm fuse socket (european type fuse, print variant)
  76.              some 20mm fuses (250mA)
  77.              some screws M3x15mm
  78.              some nuts M3
  79.              10cm flat cable (see "The Centronics connector" below)
  80.            1 power connector, female, 5.5mm/2.1mm outer/inner diameter
  81.          
  82.          Joystick connectors (don't miss "Fixing ..." below):
  83.          
  84.            6 sub-D connectors (male, 9 pins, print variant)
  85.          
  86.          (1) Joystick port power supply version:
  87.          
  88.            all of (0) and additionally
  89.            1 sub-D connector (male, 15 pins in 2 rows)
  90.            1 power connector, male, 5.5mm/2.1mm outer/inner diameter
  91.              1m-2m stranded wire (2 strands)
  92.          
  93.          (2) DC transformer power supply version:
  94.          
  95.            all of (0) and additionally
  96.            1 voltage stabilizer 7805 (1A)
  97.            1 diod 1N4001
  98.          
  99.          (3) AC transformer power supply version:
  100.          
  101.            all of (0) and additionally
  102.            4 diods 1N4001
  103.            1 voltage stabilizer 7815 (1A)
  104.            1 voltage stabilizer 7805 (1A)
  105.            1 capacitor 0.1µF
  106.  
  107.          Total cost should be about DM50 or US$30.
  108.          
  109.          
  110.          Fixing the joystick connectors
  111.          ------------------------------
  112.          
  113.          As only few joysticks plugs fit easily, while most require
  114.          some small force, you should fasten the joystick connectors to
  115.          the board with screws. Take care that the connectors are
  116.          suited for screwing them to the boards. Most connectors have
  117.          weak clamps to fix them: These clamps usually are too weak,
  118.          but they can be cut with a pair of tongs (after taking the
  119.          connectors apart) to make way for screws.
  120.          
  121.          
  122.          Soldering
  123.          ---------
  124.          
  125.          For the joystick port powered version, print PLCPLN1.PCL/PCX/PS,
  126.          if you want to use an AC transformer, print out
  127.          PLCPLN3.PCL/PCX/PS, if you want to use a DC one, print
  128.          PLCPLN2.PCL/PCX/PS. Solder in the joystick connectors first,
  129.          then the chip sockets and the 330 ohm resistor.
  130.          
  131.          Joystick port version: Solder in the 0.1µF capacitor and the
  132.          wire connections.
  133.          
  134.          AC version: Proceed with the voltage stabilizers and the 0.1µF
  135.          capacitors.  Then insert the four diods. The white ring at the
  136.          minus end shows the correct orientation. (Be quick when
  137.          soldering the stabilizers and the diods - they can be damaged
  138.          by too much heat).
  139.          
  140.          DC version: There's just one stabilizer, while the other one
  141.          is replaced by a wire connection between the outer pins. The
  142.          second capacitor is dropped. There is just one diod, too, and
  143.          one wire connection. The white ring at the minus-end of the
  144.          diod shows the correct orientation. (Be quick when soldering
  145.          the stabilizer and the diod - they can be damaged by too much
  146.          heat).
  147.          
  148.          Next, take four pieces of stranded wire of 80 mm length. Use
  149.          two of them to connect the LED to the board. For correct
  150.          orientation, remember that the rim at the lower end of the LED
  151.          is usually flattened at the minus side. Connect this pin to J3,
  152.          the positive pin to J4.
  153.               Then, use the other two pieces of wire to connect the the
  154.          power connector to the board. For the Joystick port and the DC
  155.          version, J1 is GND, while J2 is +5V.
  156.          
  157.          Joystick port version: Pin 1 of the analogue joystick port is
  158.          5V, pin 4 is GND. Connect the joystick plug via the stranded
  159.          wire to the power plug and take care that GND is in the center
  160.          of the power plug.
  161.          
  162.          DC version: GND is usually in the center of the power plug. If
  163.          you are unsure, use a voltmeter to determine the correct
  164.          orientation. If you don't have a voltmeter, just try it out -
  165.          if it's wrong, nothing will happen.
  166.          
  167.          AC version: It's AC - no orientation problems here.
  168.          
  169.          Last, solder in the 100µF capacitor (labeled "-" on the minus
  170.          side) and the fuse socket.
  171.          
  172.          
  173.          Testing the power stabilization
  174.          -------------------------------
  175.          
  176.          Now you can test if the power stabilization part of the inter-
  177.          face works: Insert a fuse, connect the interface to the power
  178.          supply and look for the LED. It it's lit, fine. If not, check
  179.          if its orientation is correct. Between pin 12 and pin 24 of
  180.          the multiplexors you should measure 4.9V to 5.1V now.
  181.          
  182.          
  183.          The Centronics connector
  184.          ------------------------
  185.          
  186.          If you can, get a piece of flat cable with 8 strands for a 5mm
  187.          grid as the drill holes in the etched board are 5mm apart. If
  188.          you do only have the usual 2.5mm flat cable, cut it to a width
  189.          of 13 strands and use each second so the used strands are 5mm
  190.          apart. 
  191.  
  192.          The connection table:
  193.  
  194.              Board  Centronics (36pin female)          Comment
  195.               J5              22/30                      GND
  196.               J6               12                    paper empty
  197.               J7               11                        busy
  198.               J8                5                       data 3
  199.               J9                4                       data 2
  200.               J10               3                       data 1
  201.               J11               2                       data 0
  202.          
  203.          Note: The flat cable tends to break if you just lay the board
  204.          flat on the table and start playing. We recommend to enclose
  205.          the board in some kind of case. 125mm x 70mm x 30mm is about
  206.          the minimum size for such a case. A width of 65mm to 75mm is a
  207.          must if you want to access all joystick ports without dif-
  208.          ficulties.
  209.          
  210.          
  211.          Testing the interface
  212.          ---------------------
  213.          
  214.          Insert the multiplexor chips, then connect the interface to the
  215.          power supply and to the printer cable. Start Porttest (don't
  216.          forget to tell Porttest if you don't use LPT1) and select
  217.          "test all". You should see two columns of dashes now. Connect
  218.          a joystick to each joystick port and move it into each direc-
  219.          tion. Any move of the joystick should light exactly one P or
  220.          B.
  221.          
  222.          
  223.          Troubleshooting
  224.          ---------------
  225.  
  226.          If you use a printed circuit, chances are good that you will
  227.          never need this section.
  228.          
  229.          Problem: There are lots of Ps and Bs before I move the joys-
  230.          tick!
  231.          
  232.          Solution: Probably the ground line is not connected so compu-
  233.          ter and interface don't have the same ground voltage.
  234.          
  235.          Problem: All Ps and Bs are dead!
  236.          
  237.          Solution: May be a worse case of the next problem, so see
  238.          below. If you are lucky, you just forgot to tell Porttest
  239.          about LPT2.
  240.          
  241.          Problem: About half of the Ps and Bs light willingly, but the
  242.          other half is dead.
  243.          
  244.          Solution: a) the power supply of one of the multiplexors is not
  245.          connected. Check if pin 24 missed the socket or the soldering
  246.          of the socket's pin is bad. b) the input line to the Centro-
  247.          nics connector is not connected. Check pin 10 of both multi-
  248.          plexors, the wire they are connected to and pin 11 and 12 of
  249.          the centronics connector.
  250.          
  251.          Problem: Some joystick movements don't light a P or B.
  252.          
  253.          Solution: Check the soldering of all pins of this joystick and
  254.          the multiplexor pins they are connected to. Perhaps a multi-
  255.          plexor pin missed the socket.
  256.          
  257.          Problem: All joystick movements light two Ps or Bs.
  258.          
  259.          Solution: Probably you shortened two address lines. Check pin
  260.          2 to 5 of the Centronics connector and all lines they are con-
  261.          nected to.
  262.          
  263.          Problem: Some joystick movements light two Ps or Bs.
  264.          
  265.          Solution: Probably you shortened two joystick direction lines.
  266.          Check all pins of this joystick and the lines connected to it.
  267.  
  268.  
  269.          Final Step
  270.          ----------
  271.  
  272.          To honour our efforts and encourage us to continue our work,
  273.          send a triumphant postcard to:
  274.  
  275.                 Christof Ruch
  276.                 Rollplatz 19
  277.                 38678 Clausthal-Zellerfeld
  278.                 Germany
  279.  
  280.  
  281.